import service from "@/service";
import type {IBanner} from "@/myTypes"


// 1、获取所有的轮播图数据：

export const getBannerListApi = () =>service({url: "/banner/list"});


// 2、添加轮播图数据

export const addBannerApi=(data:IBanner)=>service({
    url:"/banner/add",
    method:"post",
    data
});


// 3、删除轮播图
export const removeBannerApi = (bannerid:string) =>service({url: "/banner/delete",params:{bannerid}});


// 4、修改轮播图的访问状态：
// /banner/updateFlag
export const updateBannerFlagApi=(bannerid:string,flag:boolean)=>service.post("/banner/updateFlag",{bannerid,flag});